﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using SqlServerDAL;

public partial class VehicleUI_OneVehicleIndex : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FilterFrameNO"] != null)
        {
            string frameNO = Session["FilterFrameNO"].ToString();
            Vehicle v = new VehicleDAL().GetModel(frameNO);
            if (v != null)
            {
                txt_VehicleID.Text = v.VehicleID;
                txt_FrameNO.Text = v.FrameNO;
            }
        }
    }
    protected void btn_Sure_Click(object sender, EventArgs e)
    {
        Session["FilterFrameNO"] = txt_FrameNO.Text.Trim();
        Response.Redirect(Request.Url.ToString()); 
    }
}
